package no.sachmuld.methodcombination.demo;

import no.sachmuld.methodcombination.api.CrosscuttingBehaviour;
import no.sachmuld.methodcombination.api.MethodCombinationSupport;
import no.sachmuld.methodcombination.api.annotation.Crosscutting;
import no.sachmuld.methodcombination.api.annotation.MethodCombinationException;
import no.sachmuld.methodcombination.api.annotation.UsesMethodCombination;

import java.util.List;

/**
 *
 */
@UsesMethodCombination(RepositoryBehaviour.class)
public abstract class Repository <T extends Entity> extends MethodCombinationSupport<CrosscuttingBehaviour> {

    @Crosscutting
    final public T insert(T entity) {
        throw new MethodCombinationException();
    }

    @Crosscutting
    final public T update(T entity) {
        throw new MethodCombinationException();
    }

    @Crosscutting
    final public T select(Long id) {
        throw new MethodCombinationException();
    }

    @Crosscutting
    final public List<T> selectAll() {
        throw new MethodCombinationException();
    }

    @Crosscutting
    final public void delete(Long id) {
        throw new MethodCombinationException();
    }

    @Crosscutting
    final public long count() {
        throw new MethodCombinationException();
    }

}
